<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="logging_v2beta1.html">Google Cloud Logging API</a> . <a href="logging_v2beta1.entries.html">entries</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#list">list(body, x__xgafv=None)</a></code></p>
<p class="firstline">Lists log entries. Use this method to retrieve log entries from Cloud Logging. For ways to export log entries, see [Exporting Logs](/logging/docs/export).</p>
<p class="toc_element">
  <code><a href="#write">write(body, x__xgafv=None)</a></code></p>
<p class="firstline">Writes log entries to Cloud Logging. All log entries in Cloud Logging are written by this method.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="list">list(body, x__xgafv=None)</code>
  <pre>Lists log entries. Use this method to retrieve log entries from Cloud Logging. For ways to export log entries, see [Exporting Logs](/logging/docs/export).

Args:
  body: object, The request body. (required)
    The object takes the form of:

{ # The parameters to `ListLogEntries`.
    "filter": "A String", # Optional. An [advanced logs filter](/logging/docs/view/advanced_filters). The filter is compared against all log entries in the projects specified by `projectIds`. Only entries that match the filter are retrieved. An empty filter matches all log entries.
    "projectIds": [ # Required. One or more project IDs or project numbers from which to retrieve log entries. Examples of a project ID: `"my-project-1A"`, `"1234567890"`.
      "A String",
    ],
    "pageSize": 42, # Optional. The maximum number of results to return from this request. Fewer results might be returned. You must check for the `nextPageToken` result to determine if additional results are available, which you can retrieve by passing the `nextPageToken` value in the `pageToken` parameter to the next request.
    "orderBy": "A String", # Optional. How the results should be sorted. Presently, the only permitted values are `"timestamp"` (default) and `"timestamp desc"`. The first option returns entries in order of increasing values of `LogEntry.timestamp` (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of `LogEntry.insertId`.
    "pageToken": "A String", # Optional. If the `pageToken` request parameter is supplied, then the next page of results in the set are retrieved. The `pageToken` parameter must be set with the value of the `nextPageToken` result parameter from the previous request. The values of `projectIds`, `filter`, and `orderBy` must be the same as in the previous request.
  }

  x__xgafv: string, V1 error format.

Returns:
  An object of the form:

    { # Result returned from `ListLogEntries`.
    "nextPageToken": "A String", # If there are more results than were returned, then `nextPageToken` is given a value in the response. To get the next batch of results, call this method again using the value of `nextPageToken` as `pageToken`.
    "entries": [ # A list of log entries.
      { # An individual entry in a log.
        "httpRequest": { # A common proto for logging HTTP requests. # Optional. Information about the HTTP request associated with this log entry, if applicable.
          "status": 42, # The response code indicating the status of response. Examples: 200, 404.
          "cacheHit": True or False, # Whether or not an entity was served from cache (with or without validation).
          "requestUrl": "A String", # The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: `"http://example.com/some/info?color=red"`.
          "requestMethod": "A String", # The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
          "referer": "A String", # The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
          "remoteIp": "A String", # The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
          "validatedWithOriginServer": True or False, # Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if `cache_hit` is True.
          "userAgent": "A String", # The user agent sent by the client. Example: `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`.
          "requestSize": "A String", # The size of the HTTP request message in bytes, including the request headers and the request body.
          "responseSize": "A String", # The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.
        },
        "resource": { # A specific monitored resource or a group of monitored resources. # Required. The monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error.
          "labels": { # Values for some or all of the labels listed in the associated monitored resource descriptor. For example, specify a specific Cloud SQL database by supplying values for both the `"database_id"` and `"zone"` labels. Specify the set of all Cloud SQL databases in a particular location by supplying a value for only the `"zone"` label.
            "a_key": "A String",
          },
          "type": "A String", # The type of monitored resource. This field must match the value of the `type` field in a MonitoredResourceDescriptor object. For example, `"cloudsql_database"` represents Cloud SQL databases.
        },
        "severity": "A String", # Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
        "textPayload": "A String", # The log entry payload, represented as a Unicode string (UTF-8).
        "timestamp": "A String", # Optional. The time the event described by the log entry occurred. If omitted, Cloud Logging will use the time the log entry is written.
        "labels": { # Optional. A set of user-defined (key, value) data that provides additional information about the log entry.
          "a_key": "A String",
        },
        "insertId": "A String", # Optional. A unique ID for the log entry. If you provide this field, the logging service considers other log entries in the same log with the same ID as duplicates which can be removed. If omitted, Cloud Logging will generate a unique ID for this log entry.
        "jsonPayload": { # The log entry payload, represented as a structure that is expressed as a JSON object.
          "a_key": "", # Properties of the object.
        },
        "logName": "A String", # Required. The resource name of the log to which this log entry belongs. The format of the name is `projects/<project-id>/logs/<log-id%gt;`. Examples: `"projects/my-projectid/logs/syslog"`, `"projects/1234567890/logs/library.googleapis.com%2Fbook_log"`. The log ID part of resource name must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters: [A-Za-z0-9]; and punctuation characters: forward-slash, underscore, hyphen, and period. Forward-slash (`/`) characters in the log ID must be URL-encoded.
        "protoPayload": { # The log entry payload, represented as a protocol buffer. You can only use `protoPayload` values that belong to a set of approved types.
          "a_key": "", # Properties of the object. Contains field @ype with type URL.
        },
        "operation": { # Additional information about a potentially long-running operation with which a log entry is associated. # Optional. Information about an operation associated with the log entry, if applicable.
          "last": True or False, # Optional. Set this to True if this is the last log entry in the operation.
          "id": "A String", # Required. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation.
          "producer": "A String", # Required. An arbitrary producer identifier. The combination of `id` and `producer` must be globally unique. Examples for `producer`: `"MyDivision.MyBigCompany.com"`, "github.com/MyProject/MyApplication"`.
          "first": True or False, # Optional. Set this to True if this is the first log entry in the operation.
        },
      },
    ],
  }</pre>
</div>

<div class="method">
    <code class="details" id="write">write(body, x__xgafv=None)</code>
  <pre>Writes log entries to Cloud Logging. All log entries in Cloud Logging are written by this method.

Args:
  body: object, The request body. (required)
    The object takes the form of:

{ # The parameters to WriteLogEntries.
    "resource": { # A specific monitored resource or a group of monitored resources. # Optional. A default monitored resource for those log entries in `entries` that do not specify their own `resource`.
      "labels": { # Values for some or all of the labels listed in the associated monitored resource descriptor. For example, specify a specific Cloud SQL database by supplying values for both the `"database_id"` and `"zone"` labels. Specify the set of all Cloud SQL databases in a particular location by supplying a value for only the `"zone"` label.
        "a_key": "A String",
      },
      "type": "A String", # The type of monitored resource. This field must match the value of the `type` field in a MonitoredResourceDescriptor object. For example, `"cloudsql_database"` represents Cloud SQL databases.
    },
    "labels": { # Optional. User-defined `key:value` items that are added to the `labels` field of each log entry in `entries`, except when a log entry specifies its own `key:value` item with the same key. Example: `{ "size": "large", "color":"red" }`
      "a_key": "A String",
    },
    "logName": "A String", # Optional. A default log resource name for those log entries in `entries` that do not specify their own `logName`. Example: `"projects/my-project/logs/syslog"`. See LogEntry.
    "entries": [ # Required. The log entries to write. The log entries must have values for all required fields.
      { # An individual entry in a log.
        "httpRequest": { # A common proto for logging HTTP requests. # Optional. Information about the HTTP request associated with this log entry, if applicable.
          "status": 42, # The response code indicating the status of response. Examples: 200, 404.
          "cacheHit": True or False, # Whether or not an entity was served from cache (with or without validation).
          "requestUrl": "A String", # The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: `"http://example.com/some/info?color=red"`.
          "requestMethod": "A String", # The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
          "referer": "A String", # The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
          "remoteIp": "A String", # The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
          "validatedWithOriginServer": True or False, # Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if `cache_hit` is True.
          "userAgent": "A String", # The user agent sent by the client. Example: `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`.
          "requestSize": "A String", # The size of the HTTP request message in bytes, including the request headers and the request body.
          "responseSize": "A String", # The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.
        },
        "resource": { # A specific monitored resource or a group of monitored resources. # Required. The monitored resource associated with this log entry. Example: a log entry that reports a database error would be associated with the monitored resource designating the particular database that reported the error.
          "labels": { # Values for some or all of the labels listed in the associated monitored resource descriptor. For example, specify a specific Cloud SQL database by supplying values for both the `"database_id"` and `"zone"` labels. Specify the set of all Cloud SQL databases in a particular location by supplying a value for only the `"zone"` label.
            "a_key": "A String",
          },
          "type": "A String", # The type of monitored resource. This field must match the value of the `type` field in a MonitoredResourceDescriptor object. For example, `"cloudsql_database"` represents Cloud SQL databases.
        },
        "severity": "A String", # Optional. The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
        "textPayload": "A String", # The log entry payload, represented as a Unicode string (UTF-8).
        "timestamp": "A String", # Optional. The time the event described by the log entry occurred. If omitted, Cloud Logging will use the time the log entry is written.
        "labels": { # Optional. A set of user-defined (key, value) data that provides additional information about the log entry.
          "a_key": "A String",
        },
        "insertId": "A String", # Optional. A unique ID for the log entry. If you provide this field, the logging service considers other log entries in the same log with the same ID as duplicates which can be removed. If omitted, Cloud Logging will generate a unique ID for this log entry.
        "jsonPayload": { # The log entry payload, represented as a structure that is expressed as a JSON object.
          "a_key": "", # Properties of the object.
        },
        "logName": "A String", # Required. The resource name of the log to which this log entry belongs. The format of the name is `projects/<project-id>/logs/<log-id%gt;`. Examples: `"projects/my-projectid/logs/syslog"`, `"projects/1234567890/logs/library.googleapis.com%2Fbook_log"`. The log ID part of resource name must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters: [A-Za-z0-9]; and punctuation characters: forward-slash, underscore, hyphen, and period. Forward-slash (`/`) characters in the log ID must be URL-encoded.
        "protoPayload": { # The log entry payload, represented as a protocol buffer. You can only use `protoPayload` values that belong to a set of approved types.
          "a_key": "", # Properties of the object. Contains field @ype with type URL.
        },
        "operation": { # Additional information about a potentially long-running operation with which a log entry is associated. # Optional. Information about an operation associated with the log entry, if applicable.
          "last": True or False, # Optional. Set this to True if this is the last log entry in the operation.
          "id": "A String", # Required. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation.
          "producer": "A String", # Required. An arbitrary producer identifier. The combination of `id` and `producer` must be globally unique. Examples for `producer`: `"MyDivision.MyBigCompany.com"`, "github.com/MyProject/MyApplication"`.
          "first": True or False, # Optional. Set this to True if this is the first log entry in the operation.
        },
      },
    ],
  }

  x__xgafv: string, V1 error format.

Returns:
  An object of the form:

    { # Result returned from WriteLogEntries. empty
  }</pre>
</div>

</body></html>